<?php
/*
CMSimple - Calendar Plugin - version 0.5 Final
*/
initvar('calendar');
if($calendar){
global $sn,$sv,$sl,$pth,$plugin;

$plugin=basename(dirname(__FILE__),"/");
$admin = isset($_GET['admin']) ? $_GET['admin'] : '';
$admin .= isset($_POST['admin']) ? $_POST['admin'] : '';

$eventfile = $pth['folder']['plugins'].$plugin."/content/eventcalendar_".$sl.".txt";
if(!is_file($eventfile)){$handle = fopen($eventfile, "w");
fclose($handle);}

$o.=print_plugin_admin('on');

if($admin<>'plugin_main'){$o.=plugin_admin_common($action,$admin,$plugin);}

if($admin=='plugin_main'){
$pth['file']['plugin_main'] = $pth['folder']['plugins'].$plugin."/content/eventcalendar_".$sl.".txt";
$o .="<h1>Calendar Plugin</h1><br>Edit your eventfile : entries are in format, sepetated by ;<br>";
$o .="<b>".$plugin_tx['calendar']['event_date']." ; ";
$o .=$plugin_tx['calendar']['event_event']." ; ";
$o .=$plugin_tx['calendar']['event_location']."</b><br>";
$o .=plugin_admin_common($action,$admin,$plugin);}

if($admin=='')$o.="<br>Calendar plugin ver 0.5 final by <a href='http://cmsimpleplugins.svarrer.dk'>cmsimpleplugins.svarrer.dk</a>";
}
?>
